//
//  SingleDetilsViewController.m
//  Feel_at_home
//
//  Created by 王静雨 on 15/9/24.
//  Copyright © 2015年 Feel_at_home. All rights reserved.
//

#import "SingleDetilsViewController.h"
#import "UMSocial.h"


@interface SingleDetilsViewController ()<UMSocialUIDelegate>
@property (nonatomic ,strong) UIWebView *webView;

@end

@implementation SingleDetilsViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:self.myid]];
    [self.webView loadRequest:request];
    [self.view addSubview:self.webView];
    NSLog(@"%@",self.myid);
    
    self.webView = [[UIWebView alloc] initWithFrame:CGRectMake(0,-60, self.view.frame.size.width  , self.view.frame.size.height+160)];
//    self.webView.scalesPageToFit = NO;
    self.webView.scrollView.bounces = NO;
//    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://bohejiaju.liwushuo.com/items/%@",self.myid]]];
    
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"iconfont-fenxiang"] style:UIBarButtonItemStyleDone target:self action:@selector(Right:)];
    

    [self.webView loadRequest:request];
    [self.view addSubview:self.webView];
    

    
}

#pragma mark - 分享
- (void)Right:(UINavigationBar *)button
{
    [UMSocialSnsService presentSnsIconSheetView:self
                                         appKey:@"507fcab25270157b37000010"
                                      shareText:self.myid
                                     shareImage:[UIImage imageNamed:@""]
                                shareToSnsNames:[NSArray arrayWithObjects:UMShareToSina,UMShareToTencent,UMShareToRenren,nil]
                                       delegate:self];
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
